Frequency of character in string in python